/* ===========================
   RESPONSIVE - INICIO
   =========================== */

/* 1) Ajustes globales (evita desbordes) */
html, body{
  width: 100%;
  overflow-x: hidden;
}

img{
  max-width: 100%;
  height: auto;
}

/* ====== TABLET / LAPTOP PEQUEÑO ====== */
@media (max-width: 1024px){

  /* HEADER */
  .header{
    padding: 12px 16px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .logo{
    width: min(320px, 90vw) !important;
    height: auto !important;
    margin: 0 !important;
  }

  .barnav{
    width: 100%;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .menu{
    width: auto !important;
    margin: 0 !important;
  }

  .barnav a{
    display: inline-block;
    padding: 8px 10px;
  }

  /* HERO */
  .nav{
    width: 100% !important;
    min-height: 360px;
    height: auto !important;
    padding: 26px 14px;
    background-position: center;
    background-size: cover;
    text-align: center;
  }

  .title-nav{
    font-size: 2.2em;
    text-align: center;
  }

  .title-nav1{
    font-size: 1.1em;
    text-align: center;
    max-width: 820px;
  }

  .btn-nav{
    padding: 12px 26px;
    font-size: 1rem;
  }

   /* CLIENTES (logos) - GRID para 3 filas */
  .banner{
    width: 100% !important;
    height: auto !important;
    padding: 28px 0;
  }

  .title-banner{
    text-align: center !important;
    margin: 0 !important;
  }

  .banner .galery{
    width: min(980px, 92%);
    margin: 0 auto;
    margin-top: 22px;

    display: grid;
    grid-template-columns: repeat(4, 1fr); /* tablet: 4 por fila */
    gap: 22px;
    justify-items: center;
    align-items: center;
  }

  .banner .cliente-logo{
    width: 160px;
    height: 90px;
    object-fit: contain;
    display: block;
  }
  /* SERVICIOS (cards) */
  .article{
    height: auto !important;
    padding: 28px 0 34px;
  }

  .cards{
    height: auto !important;        /* tu CSS base tiene height:0% */
    margin: 0 !important;
    padding: 0 14px;
    flex-wrap: wrap;
    gap: 16px;
  }

  .card{
    width: min(480px, 92vw);
    margin: 0 !important;
  }

  .card-img{
    height: 260px !important;
  }

  /* TRABAJOS DESTACADOS */
  .representations{
    height: auto !important;
    padding: 26px 0 10px;
  }

  .galery1{
    width: min(92%, 980px);
    height: auto !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 18px !important;
  }

  .box-img1{
    width: 100% !important;
    margin-top: 0 !important;
  }

  .imagen8,.imagen9,.imagen10,.imagen11{
    width: min(480px, 92vw);
    height: 260px !important;
    object-fit: cover;
  }

  .card-body1{
    width: 100% !important;
    height: auto !important;
    padding: 10px 8px !important;
  }

  /* CONTACTO */
  .contact{
    height: auto !important;
    padding: 28px 0 34px;
  }

  .container-contact{
    width: 100%;
    padding: 0 14px;
  }

  .title-contact{
    margin: 0 0 16px 0 !important; /* en tu CSS base está en negativo */
    text-align: center !important;
    font-size: 1.8em;
  }

  .contact-grid{
    margin-top: 0 !important;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .panel1{
    width: 100% !important;
    height: auto !important;
  }

  .panel2{
    width: 100% !important;
  }

  /* FOOTER */
  .footer{
    height: auto !important;
    padding: 18px 0 10px;
  }

  .footer-grid{
    margin: 0 !important;
    padding: 16px 14px;
    grid-template-columns: 1fr !important;
    gap: 12px;
    align-items: start;
    text-align: center;
  }

  .footer-logo{
    margin: 0 !important;
    height: 120px !important;
  }

  .footer h4{
    margin: 0 0 8px 0 !important;
  }

  .footer a{
    margin: 0 !important;
    padding: 6px 0 !important;
  }

  .small{
    margin: 10px 0 0 0 !important;
  }
}

/* ====== MÓVIL ====== */
@media (max-width: 600px){

  /* HEADER */
  .barnav{
    flex-direction: column;
    gap: 6px;
  }

  .barnav a{
    width: 100%;
    text-align: center;
    border-radius: 10px;
  }

  /* HERO */
  .title-nav{
    font-size: 1.7em;
    line-height: 1.15;
  }

  .title-nav1{
    font-size: 1em;
    line-height: 1.3;
    padding: 0 8px;
  }

  /* Cards */
  .card-img{
    height: 220px !important;
  }

  .imagen8,.imagen9,.imagen10,.imagen11{
    height: 220px !important;
  }
/* CLIENTES (logos) - móvil */
  .banner .galery{
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* móvil: 2 por fila */
    gap: 16px;
    width: min(94%, 520px);
    margin: 0 auto;
    margin-top: 18px;
    justify-items: center;
    align-items: center;
  }

  .banner .cliente-logo{
    width: 125px;
    height: 70px;
    object-fit: contain;
  }
}